package com.jzo2o.customer.controller.consumer;/**
 * @author wl
 * @version 1.0
 * @since 2025-09-17 10:32
 */

import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationService;
import com.jzo2o.mvc.model.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 服务人员认证
 *
 * @author itcast
 * @create 2023/7/7 19:34
 **/
@RestController("CertificationController")
@RequestMapping("/worker/worker-certification-audit")
@Api(tags = "服务人员认证端")
public class WorkerCertificationController {

    @Resource
    private IWorkerCertificationService workerCertificationService;

    /**
     * 服务人员认证
     *
     * @param workerCertificationAuditAddReqDTO
     */
    @PostMapping
    @ApiOperation("服务人员认证")
    public void workerCertificationAudit(@RequestBody WorkerCertificationAuditAddReqDTO workerCertificationAuditAddReqDTO) {
        workerCertificationService.workerCertificationAudit(workerCertificationAuditAddReqDTO);
    }


    @GetMapping("/rejectReason")
    public Result<String> rejectReason() {
        return Result.error(workerCertificationService.rejectReason());
    }
}
